<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePhoneRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('phone_records', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('fs_user_id');
            $table->tinyInteger('user_id');
            $table->tinyInteger('status')->default(0)->comment('1打过,0未打');
            $table->string('call_sid')->nullable()->comment('Twilio记录call_sid,Plivod记录CallUUID');
            $table->string('apps')->nullable();
            $table->text('recording_url')->nullable();
            $table->text('voice_url')->nullable();
            $table->integer('recording_time')->nullable();
            $table->string('recording_sid')->nullable()->comment('Twilio记录recording_sid,Plivod记录RecordingID');
            $table->string('call_status');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('phone_records');
    }
}
